#!/usr/bin/env node

/**
*  android 签名工具
*/


var reqs  = require('./lib/check_reqs'),
build = require('./lib/build');
args  = process.argv;

if(args[2] == '--help' ||
  args[2] == '/?' ||
  args[2] == '-h' ||
  args[2] == 'help' ||
  args[2] == '-help' ||
  args[2] == '/help') {
    build.help();
  } else {
    reqs.run().done(function() {
      return build.run(args.slice(2));
    }, function(err) {
      console.error(err);
      process.exit(2);
    });
  }
